package today.rocky.boot.eureka.feign;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import today.rocky.boot.eureka.fallback.ProFeignFallBack;


/**
 * @author Rocky
 * @date 2020/2/25 16:23
 */

@FeignClient(name = "eureka-provider",fallbackFactory = ProFeignFallBack.class)
@RequestMapping("/provider")
public interface ProFeign {
    /**
     * 测试例子
     * @return  str
     */
    @GetMapping("/hello")
    String getHello();

    @GetMapping("/echo")
    String echo(@RequestParam String message) throws Exception;
}
